change working directory when opening a file

It was discussed whether this should be optional or not and it was
agreed to just make this default behaviour for now.
merge pull request #11 from Osse