Replaced atoi() with strtol() for better error handling.

If atoi() fails to convert, '0' is returned which matches the root user affecting the search group pool.
Merge pull request #2 from anestisb/master

Replaced atoi() with strtol() for better error handling.