Fix module name handling in `--main`

Not sure how I missed this originally, it was obviously completely
wrong!
Remove unnecessary pattern
Merge pull request #215 from garyb/master

Fix module name handling in `--main`