Centralise module filename

This builds upon and thereby replaces #89 and #88. Thanks @adamcohen and @inetdavid.

I put the decision which directory and (following from that) filename the compiled module is found at.

I also reduced the number of templates involved so that centos and ubuntu are more likely to be in sync.