Fixing the regular expression for basenames (missing end of string)