portability updates.  replaced system() calls with open()
Merge pull request #15 from MattCarothers/cox

portability updates.  replaced system() calls with open()