FM: improve error handling in dir{view,tree}_mkdir