Creating it in the current directory may cause issues if the script is run twice from different locations.
A workaround for environments where $XDG_RUNTIME_DIR is not defined is described here.
Relevant: https://superuser.com/a/1127720/390791