Never mind, figured it out. I had /tmp mounted with noexec, mounting it with exec makes it run normally.