add some checks for directories and remote

check if defined directories exist
also check if the remote and remote directory is accessible.