Fix Issue #15 - "String index out of range"
Merge pull request #17 from utoxin/master

Fix Issue #15 - "String index out of range". Pulling this only as a temporary bugfix, this code was rewritten in the dev-rc branch.