Replace platform-dependent tools to Ruby equivalents

Currently `system` was used  with `curl` and `unzip` which are not available for some platforms (eg. Windows) so I changed those to Ruby implementation and now it works cross-platform.