Add a new `canBeExecutedByScript` method

Determines if a given file object can be run (e.g. in a shell)
Whilst determining this, also check to make sure the file isn't a pipe/socket