Fixed #89 better check for exec()