Strips excess slashes, inserts root_prefix and version into action if available