Fixed bug where detecting if a remote file exists or not,