fix for crash during save of file in renamed directory