I'm not sure about the portability of this, because the version of `tar` on OS X (BSD) is slightly different and obviously not available on Windows.