Fix parsing commit messages without newline at the end