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

Fixes issue #2384.