Check if dotr file is executable

Any dotr file is executed if it exist, but it may not be set to be
executable and this will yield an error. Check instead if the file can
be executed before using it.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>