make dir() lazy; written while waiting for plane to YAPCNA