added serve-file method to serve regular file, refactored to include serving directories when given a directory