Add basedir definition to sh template