added path manipulation and better fs removal

Implemented recursive removal of file paths and removal of plain files. Added
a function for retrieve basenames of files, requiring the addition of reverse
string search. Added path tests.