Merge pull request #4 from dirkmueller/master

Expand given file path before changing directories
Fix previous commit on path canonicalization

realpath might not exist on SLE11, so use readlink -m instead.