Changed the hardcoded directory separator @"\" to use the Path.DirectorySeparatorChar so directory creation works on all platforms.