Added error handling for parseWeekToInt function.

`throw new Error(util.format('Invalid weekday: %s', weekday));` all fits within 80 chars, so it'd be okay to put on one line.