Handle glibc < 2.10 scandir prototype change
Cut very long URLs in JS prompts