Make task_id parsing support additional ids.

Adds support for tasks with non-alphanumeric values (e.g. dates
with dashes in them).

Discovered this bug as I was testing out task history locally.
Nitpick: `(name, params)` -> `name, params`