Making sure that "maindir" will use correct plugins folder

When a server owner resides that he wants his plugins folder somewhere
else or with a different name these changes will make sure that that 
wont be a problem.