Use regex-based approach to extract front matter

To let all tests pass in a cross-OS compatible way, added an EOL normalization method to FunctionalTest class.