Merge "cts: Optimize check for /dev/mem and /dev/kmem"