Fix undefined $folders and other platform get issues
Merge branch 'refactor-build' into mine