Mac nonsense

added a bunch of code so that file input isn’t such a headache in
Xcode. Comment the first line in main out when compiling on a Windows
device.