nasmlib: add function to splice pathnames