Removed unsafe cleanup from mfd_open_sn. mkpath is now more thread safe.

mkpath now succeeds even if directories are created while it runs.