prepend path in dir() when needed