Extra functions for System.Environment. All these functions are available in later GHC versions, but this code works all the way back to GHC 7.2.
Returns the absolute pathname of the current executable.
Note that for scripts and interactive sessions, this is the path to the interpreter (e.g. ghci.)