Added directory creation to spawn command