sdbm first commit
make sure path exists before slicing it in trim_slashes