Fractal behaviour of quantum paths in statistical physics