Get working directory properly.