remove stupidity of dirs and replace with something slightly less stupid.