Fix CommonJS/AMD -m --modular flag does not work when providing a 'to directory' rather than a 'to file'.
Fix CommonJS/AMD -m --modular flag does not work when providing a 'to directory' rather than a 'to file'.

stonexer/riot,scalabl3/riot,AndrewSwerlick/riot,noodle-learns-programming/riot,madlordory/riot,baysao/riot,rthbound/riot,scalabl3/riot,AndrewSwerlick/riot,xtity/riot,duongphuhiep/riot,daemonchen/riotjs,muut/riotjs,madlordory/riot,duongphuhiep/riot,dp-lewis/riot,davidmarkclements/riot,stonexer/riot,daemonchen/riotjs,davidmarkclements/riot,crisward/riot,dschnare/riot,rasata/riot,laomu1988/riot,seedtigo/riot,seedtigo/riot,qrb/riotjs,sylvainpolletvillard/riot,marcioj/riot,marcioj/riot,zawsx/js-lib-webcomponents-react-riot,xtity/riot,zawsx/js-lib-webcomponents-react-riot,muut/riotjs,joshcartme/riot,joshcartme/riot,rthbound/riot,chetanism/riot,txchen/riotjs,laomu1988/riot,tao-zeng/riot,noodle-learns-programming/riot,dschnare/riot,txchen/riotjs,beni55/riot,baysao/riot,sylvainpolletvillard/riot,dp-lewis/riot,crisward/riot,thepian/riot,rasata/riot,tao-zeng/riot,qrb/riotjs,beni55/riot,chetanism/riot,thepian/riot