use helper function recurse_copy to copy the template directory even if we don't have shell access.