Fixing handling of predeploy to ensure dist is correctly created.