Update nxtd.py

Fix a potential security issue.