I found the cause for this.
in the setting section, where I had to write the url of the site, I noticed the site url had two slashes at the end of it!
and then I removed one of it and save it, again two slashes! I removed all of the ending slashes and saved settings and there it was one slash! and all started to work.
So basically it was caused because when someone adds a url in that section, the script blindly adds another slash so that in case people add a url with out a trailing slash (such as google.com) they wouldnt have any issues creating path such as siteurl\ask, etc.
this is a bug which needs to be addressed.
and Thanks for the great support!