Capture the dir property

/to @bajtos 

See https://github.com/strongloop/generator-loopback/issues/66