Now works with filenames that have multiple dots

According to http://tex.stackexchange.com/a/10575/828 we have to mask
the dots from the token scanner.
Additionally updating subprocess.call to not use shell=True, which is
safer.