Made utils.rm also delete directories.
Fixed libnames to use the configured prefix.
Made the regexes to search for main() configurable.