Fixed tests when sudo is installed on Linux distributions