add a '^' and '$' to the end of the file matching pattern so it cant get confused by buffer names that happen to be a substring of buffer we are comparing against