Test cases for bug fixes in cat and uniq