psi.h: Include errno header
psi.h: Include sys/stat.h header
psi_file: Add _psi_isdir private method

Use this to verify a file to be loaded is not a directory or symlink
psi_file: psi_load checks if path is a directory
Merge branch 'sanity-test-suite'