Remove trailing slash in URL if it exists

Added regular expression to remove trailing slash if included in URL. Api::__construct