Fixed '.' and '-' not being accepted by a commands module.

Fixes issue #2384.
Merge pull request #488 from kacfengine/issue-2384

Fixed '.' and '-' not being accepted by a commands module.