Use jQuery promises correctly; fixes issue #8.
Bumped version to 0.1.1.
Merged from master.