Avoid double checks for direct execution of a script

Signed-off-by: Michal Čihař <michal@cihar.com>