Change how the readdir/opendir hack works