fixed order of copying and cleaning config directories in ngninx script