use cwd on Popen to be threadsafe

 - application wide os.chdir should not be used

Change-Id: Icb16751e0cd3c298003359596214fc3680c20f94
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
add new argument to threadedwork

 - maxThreads specifies how many jobs can be run in parallel

Change-Id: If77b7e8c800ebfd63772e75d9515e55103d748d1
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
cleanup threaded progress output

Change-Id: Ia553daf9b3947f3862199c949a4477167aa1fa85
Reviewed-by: Kai Koehne <kai.koehne@digia.com>