Require 'date' unless DateTime is already defined
Catch errors when parsing dates
Strips whitespace from metadata pair
Add some more specs for process_output method