FLAGS => LIBS, improve modules script

It hadn't been properly propagated among all concerned files. Also,
setting CFLAGS in that file doesn't make any sense.

So LIBS is fine.

Also, the modules script now properly removes the `enabled` folder if
it's empty. And it redirects `wc` error messages to /dev/null correctly
and doesn't spam anymore.