Update foo.hs

I move the IBM to UTF8 conversion into the parsing of the Text heade.
I converted getBinHeader into an applicative style that removes the repetition you noticed.
EXERCISE: convert getTraceHeader into the same style.

plus a few more.
Merge pull request #1 from tomberek/patch-2

Update foo.hs