Custom listdir implementation (from 2012-08-09)