core_read's ParseScript(): minor cleanups
core_read's ParseScript(): minor cleanups

- use .empty() rather than .size() == 0
- use a const_iterator rather than BOOST_FOREACH
- validate iterators before creating a string from them

langerhans/dogecoin,langerhans/dogecoin,langerhans/dogecoin,langerhans/dogecoin,langerhans/dogecoin,langerhans/dogecoin