On functions with derivatives in a Lorentz space