Handle different signatures for generate function

This should handle the different scenarios that came to mind when using the generate function.

```javascript
var options = {
  format: 'jpg'
}

previews.generate('http://filepreviews.io/', options, function(err, result) {
  console.log(result.previewURL);
  console.log(result.metadata);
});

previews.generate('http://filepreviews.io/', function(err, result) {
  console.log(result.previewURL);
  console.log(result.metadata);
});

previews.generate('http://filepreviews.io/');

previews.generate('http://filepreviews.io/', options);
```