added dir module to handle index. files correctly