Adding unit tests

- requires py.test, a local ssh server, scp and diff
Fix dirname with spaces bug

- we lose spaces in directory names on recieving a pushd