Use File::Basename instead of having our own half-arsed version.