respect filesystem max filename size

When saving tempfiles we need to respect the maximum size name that the
filesystem allows.  Luckily Rails already ran into this problem with
it's caching framework so we already have the perfectly sized constant
we can just reuse to shorted all temp files names accordingly.