Modify findBaseDir() for OS X compatibility

Use proc_pidpath() on OS X to determine the pathname of the process' executable, as OS X lacks a /proc file system.