fix returned file path (relative, not absolute)
correct pathname resolution
serve json directory listing for directories
updated src header
fix indents
better progress bar