Better emulation of C in executor wrt file handles

Now, we return a null pointer on failure to open a file, and we allow
isNull to check handles as well as pointers. For handles, it returns true.