Fixed problems with working directory.