DRYing POpen Calls

This should help with issue #12 and also a little bit with issue #8