bstr.[ch], path.[ch]: add string and path handling functions