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'.

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