Helper function to serve given directory.