Updated for correct glob.sync and other tweaks