Get file name when determining module name

Whole path may be passed as sys.argv[1].
Use separate testing macro for each source file

Otherwise there are multiple main() functions which breaks compilation.
Add lame Makefile for compiling and testing things

It would be much better to use autotools, but I didn't have time and energy to
study them enough to be able to write it.