Consolidate implementation for exec file locking and parent folder
creation in ExecFileLoader.save().