Fixing custom prompt so it doesnt crash when a folder you are in is deleted