Allow proportional scaling of thumbnals and images

It was impossible to set with or height to 0 as it then always default settings were used.
This is now possible. Default values are now only used if other than digits are in those parameters.
``thumbnail(img, 400, 0, 'r')`` now gives you as expected an image with height scaled proportional instead of default height.