Fixed Template Class

Made the setup.php compatible with all OS