Define extern char **environ for OSX, which doesn't define it in a header
Merge pull request #93 from jjthrash/extern_environ

Define extern char **environ for OSX, which doesn't define it in a header
Use stat when listing files so that link to directories are handled as directories