quote header values that contain non-asci encodings or whitespace

* Based on discussions in #63 this change increases the cases where header values are uri encoded.
* This change does not handle filenames with non-ascii character sets.