Fix on regexp.

This changes the on regexp to need either a space or a line beginning
when matching.
Fixes #27.