driver: remove unneeded build files and fix loop in module reader