added parameter statedir for easier configuration
Merge pull request #13 from dgoetz/master

added parameter statedir for easier configuration