fix endian value in gifti
fix b64encoding for no newline in outputs
fixes + backcompat test
TST+BF: extend comments and tests on bad gii file

Luckily one of our test files uses a couple of bad encoding values, and
carriage returns in base64 data.  Comment on this and add explicit
checks of endianness.
TST: check gifti bad contents gets written as good

Check for presence of bad tags and their removal by loading and saving
the file.
BF+RF: refactor base64 and array to text for py3

Refactor base64 imports to use the standard interface.

Replace use of np.savetxt and BytesIO with a small custom function for
writing comma-delimited text.  Fixes Python 3 incompatibility mixing
output from BytesIO with strings.
RF: remove duplicate test

We're testing backwards compatibility in `test_base64_written`
TST: add round trip tests for example images

Add tests for saved / loaded example images.
Merge pull request #235 from matthew-brett/caret-fixes-continued

MRG: fixes to gifti writing

Closes https://github.com/nipy/nibabel/issues/230

Use standard b64 encoding instead of legacy, and fix written endian code (we were using the wrong code).   Extend tests to make sure we can read files we wrote before this fix.