Bugfix when using the dir parameter in the paths command