Actually...turns out that plus I forgot may indeed be causing the problem. Try changing that one line and see if it helps.

Just change this...
 Code:
$dir = $home$folder
to this
 Code:
$dir = $home+$folder


Edited by ShaneEP (2013-10-26 01:46 AM)