Allow specifying max. depth for GetDirList(), add dirlist example for testing, fix build on Haiku