Changed the way subprocess..

it was causing issues on windows and ubuntu.