Merge André Twupack's fix into master
- avoid crash for unreadable directories
fix for crash during save of file in renamed directory