Extracted methods to check if modification of a file is possible and to determine if a specific file is currently select to take care of denying upload and re-selecting file after upload. Refactored watched folder handler to use the same methods and mirror behaviour of file upload via API. Should solve #1760