Fix finding basename