Extracted parsing of Content-Disposition header.

- Fixed a bug and added tests.
- Added unit tests.