OSX didn't know about MAX_PATH, had to include limits.h; Use heap not stack memory