Fix module name handling in `--main`

Not sure how I missed this originally, it was obviously completely wrong!

Also sets up a change I have to fix the issue in psci mentioned in #214