don't allow changedir if it's not a real directory