Add optional utf8 flag to parse() method.

Use three-argument open(). Open in :encoding(UTF-8) mode if utf8 parameter is true.