create test/temp dir first, also resolve command path better