Pathing issues for spinner.gif, image folder

Image folder detection failing on some systems since webroot was missing from is_dir() command. Also spinner.gif failing on systems using custom URLs.