Debug info for exceptions in manage_file
manage file create directories with default mode

When no explicit mode or dir_mode is given to manage_file don't try and
convert 'None' to a mode
Merge pull request #9651 from mbirtwell/default_dir_mode

File manage fails if it needs to create directories and no mode argument was supplied