Resize to fit closes #393

A convenience method to resize to fit within the specified dimensions while retaining the original aspect ratio.

I haven't run "node build.js" and "npm test". I had some troubles installing all the dependencies and i received a lot of errors while doing it.