POSIX calls optimization

This is the optimization I talked about earlier. Removed unnecessary reflection calls from `IsUnixExecutable` function, abstracted out all the reflection stuff. Pash behavior wasn't changed.