Clean up svn environment to fix OSX issues, fixes #2708, refs #2146