Prevent adding a state if it's name is already persistent in the state machine

Also fix failing test introduced in #10
Merge pull request #17 from KATT/master

Prevent adding a state which name is already persistent