Fixes Scaffold generator with --assets=false

Scaffold generator with --assets=false option 
outputs an error

See #9525
Merge pull request #10448 from arunagw/bug-fix-scaffold-generator-master

Fixes Scaffold generator with --assets=false
Review the CHANGELOG entry [ci skip]
Use Ruby 1.9 syntax
dir -> directory [ci skip]
Merge pull request #10463 from prathamesh-sonpatki/dir

dir -> directory [ci skip]