Fix plain year directive

Only Y2014 or apply year 2014 would actually set the year for the
following transactions; year 2014 would silently do nothing.
Improve error handling when parsing year directives

A literal Y directive or ‘year’ directive with an empty or invalid 
argument, e.g. ‘2o14’ (that is a small letter ‘oh’ instead of a zero)
would fail with the following rather unhelpful error message:
Error: bad lexical cast: source type value could not be interpreted as target
Bugfix 1038: empty reg report for this month period

when year was specified with literal Y or year directive, but not
when using apply year.
Merge pull request #356 from afh/pull/1038

Fix bug 1038; Improve error handling when parsing year directives