initialise library and module name to the end; this fixes #15 for real - aditionally, handle lid files in parent directory