Re-introduced a fix for temporary directory in sr_self_test (multi user safe)