Replace function is_file() verification to helper method detectPath(). Issue #25