added checking to not add duplicated slashes
Added options validation since it's assumed to be an array