Add check for '.' in require/watch requisites

This commit will cause require/watch requisites to fail if they contain
dots. The prior behavior just ignored the dot, but since the function
name is ignored, and dots are already illegal in prereq requisites, this
commit makes the behavior more consistent.

Resolves #5919.