http://www.nfpa.org/aboutthecodes/li...ookie%5Ftest=1
You did not say what fuel gas you are using. Go to NFPA 54 or NFPA 58 for the fuel gas used. The code will tell you what support spacing to use on the pipe, and show pictures of pipe runs. There is also a chart showing drip legs.
Mr. jeffmbarth is not correct about moving the pipe and causing leaks. The pipe dope is a lube, the taper of the pipe threads is what seals. If the pipe is tight, there will be no leaks.
Shut off the gas supply, remove the gas stop, extend the pipe. Reinstall the gas stop,or better, install a new gas stop. Install a new flex gas connector. The gas connectors are available in lengths from 12" to 48". You are not allowed to connect flex connectors together for increased length. You may need to use 90 * elbows so the flex connectors do not get kinked as you move the dryer in and out. Or you could run the pipe up the wall so the stop is more accessable. Turn on the gas and check for leaks. I have found the only good leak tester is available only by the gallon. I get mine from a propane supplier. The stuff HD sells is crap. You can make your own w/dawn dish soap, but,it is corrosive and will rust the black pipe. After checking for leaks, open the closed valves and light the appliances.
Do not take shortcuts. Gas go BOOM! Make house into toothpicks, kill people dead.
Last week I learned the proper response to a broken meter shut off. The meter had a leak when I did my pressure test. I made 4 calls to Cascade Gas before I got a response. The gas man went to turn on the gas, when the valve broke. No leak, but now the gas man was unable to turn on the gas at all. I did not learn any new words, in fact I had used those words on other jobs and found the words to be ineffective. But I did learn that kicking the tires on the van did not help the problem at all. The gas company had to dig a hole in the parking lot, pinch the pipe and do some other stuff before replacing the broken valve. Glad I did not try to open the valve.