Remove use of unsafePerformIO.

The original use case was to detect utf8 decoding errors. Starting with
version 0.11.0.6, the text package has native support for this.

Suggested by David Feuer.
Bump dependency on 'time' to < 2.0.
Remove redundant imports.
trailing whitespace.
More normalization during FilePath construction time: remove redundant ./'s.