A couple of handy routines to work with file paths