Better testing on SSH and a fix for loading files from ~