Added implementation to execute the exec command with arguments.