Headlight is dim if I go slow. If I connect the head light directly to the battery is there any problem?
You can do that and I would suggest using a fuse.
However, unless there is a poor connection / fault in the existing wiring or switch it won't make any difference.
If the headlight is brighter then you need to find out why : a poor contact in the switch, loose connections, corroded wires, bad earth points, loose earth points, any one or more of these can be the cause of a dim headlight.
One other thought is has someone put the wrong voltage bulb into the headlight?