Fix failing open file test

I noticed some of the travis tests are failing - a recent change seemed to have cause problems with the open file detection code (some typos in the use of subprocesses).  These commits fix that.

@iguananaut, as I think the original failures came from a commit you made - just want to make sure this wasn't intentional somehow