Fixed sed script and use IFS instead of cut

- Fixed the annoying bug where removed comments of multiline entry in
  packagelist included in the output of sed. Thanks to /u/r3j

- Use IFS+read instead of cutting the entry manually