Only count .ko files as modules when installing
Use more try/finally statements to ensure no temp files are left around