Fix for #1633: setRepresentedFilename

Without this fix, CPWindow setRepresentedFilename is set as a string, not a CPURL (as specified by the variable type). (With tests)