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