One more thing, when making a build you get an error because AssetDatabase is in the UnityEditor namespace.
Enclosing the contents of SaveMeshToFolder in #if UNITY_EDITOR fixes it.