Make reference a string with the limitation that it cannot contain invalid filename chars.