Fix bug in prompt with spaces in dirnames