handle script files with . in the name properly (Issue #23)