Creating function to save only the mesh file in a directory specified by the user