Make syntax_ok check modules without '::' in their names

Currently, syntax_ok() checks modules' syntax only if the name
contains '::', i.e. syntax_ok("My::Module") works while
syntax_ok("MyModule") doesn't.  This patch fixes this behaviour.

We still treat the argument as a file path in case no such module
exists.

This is already covered by the test suite.

Signed-off-by: Petr Šabata <contyk@redhat.com>