Can now get contents via sync method

Uses most of pull request from @dhcole and closes #46
To avoid code duplication though, sync has been added as an extra param,
instead of new function