Add parse-str to allow more flexible usage.

There is no reason that I can see to restrict the consumer of this api
to files only.