Switch back to dirname because http:// not needed