Fix scp and ssh'ing to localhost.
Merge pull request #609 from arjclark/fix-localhost-bug

Fix scp and ssh'ing to localhost.