Fixed error with spaces. Added error message when remote directory is not available.