Fix encoding error when running older python versions.

Also added setup script.