Fixed directory change bug by willem.