Fix multiple bugs with time machine directory handling.