Rewrote parsing algorithm to conform to the srcset spec

This fixes #8