I can use "." as root folder, and the script works just fine.
Can you rephrase what you mean by that and why u cannot use the "." in your script to rectify the (relative path) issue ? :
Its obvious as anything the path/relative path is not getting resolved,for which you need to do the error checking mentioned above.
are u running the script from cmd prompt ?
if so what is the output of your pwd (present working directory)command ?
and
is ure script able to run in a non-windows environment(if you have the luxury of checking that)
Do not wait to strike when the iron is hot! Make it hot by striking - WB Yeats