Fix script to create tomcat instances

The changes are tested with Debian Stable and Tomcat6 + Tomcat 7