This reverts commit e446a11bb7. Turns out this wasn't really the source of the referenced issue and someone was able to run with the original commit fine, so adding this back for now.
e446a11bb7
__dirname