Improve file detection / conversion during spec update

@movitto Agree with @Fryguy.  I"m not sure what the intent of the method is with the variable names.  what is `cp` and `cpn`?