Remove unnecessary type cast and munmap all mmap'd files.
Improve debugging messages.
Mark library as processed only if it's a known proprietary file.

Before this, libraries such as libc.so would be added, which are defintely not
proprietary.
Use strchr instead of strstr as this is a single character.