Cross-platform spec building

Make some targeted fixes to support "nt" OS systems (so that I don't
have to keep locally fixing this every time...). Tested the change on a
Mac, so no worries for you Mac folks out there... :-)