Closes #195. Closes #190. Fixes a small bug with regards to the return value in ssh.upload_file.