FIX: do not get metadata of files when getting files in a directory if
not strictly necessary
FIX: return ERROR if the connection could not be secured (invalid proxy)
Merge pull request #1465 from phicharp/fixRM-130514

FIX: do not get metadata of files when getting files in a directory if not strictly necessary