fix #6: correctly get the basename