Setting more permissions in judge code and fixed a race condition in judging.py.