Fix for compilation problem and a segmentation faults on Darwin/Mac OSX X
Removed use of the GNU Extension version of basename.

Porting to Mac OSX requires a basename version that modifies it's argument.
Current code was using the gnu extension basename() of glibc which does not
modify it's argument anyway. Solution was to include a simple rmlint_basename()
function in filter.c which behaves the same way in a portable manner.

This also fixes some previous warnings.