Fixed bug in hours_worked

Behaves badly when fed date ranges, missing the last day. Usage changed
in other methods.

Also added a test to check.