Rewrote parsing algorithm to conform to the srcset spec

Sorry for the spam! This should **really** fix it now.