Fixes to scaffolding

Changed the directory creation to use the sync API