Use "%~f0" to get the full path of rebat.bat to correctly locate the
rebar script. Also put the script name in quotes when passing it to
escript.exe to correctly handle paths with spaces.
Add support for invoking rebar from other than current directory.
For example: ..\rebar create-node nodeid=mysample
requires rebar.bar and rebar (escript) to be in the same directory.