fix filename and version detection

When filename contains '@@' the split will return more then two elements. In this case we'll got ValueError. 
To avoid that we need to split on the last occurrence of '@@'.