adds express directory middleware