Fix regression when installing modules in subdirectories. Closes #143.