Fix test to work with optimize() signature

optimize() expects args parameter, which is an object
of {data, path}.
Merge pull request #18 from amitayd/fix-tests

Fix test to work with optimize() signature