use chunked encoding for directory listing

a simple fix for issue #166: Directory listing must use chunked encoding.