title: URLByAppendingPathComponent with archiveRootObject not working correctly?
body: <p>i am currently working with SpriteKit on Xcode 7 and ios 9 and i encountered that suggested URLByAppendingPathComponent method for accessing local urls for files with combination with archiveRootObject is not saving the object to the documents destination but in the Data folder. Here is the code</p>
  
  <pre><code>func saveData(){
     let objectToSave = SomeObject()
  
      let docPath = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true)[0] as String
      let path = NSURL(string: docPath)
      let fp = path?.URLByAppendingPathComponent("savedObject.data")
      if NSKeyedArchiver.archiveRootObject(objectToSave, toFile: String(fp)) {
          print("Success writing to file!")
      } else {
          print("Unable to write to file!")
      }
  
  }
  </code></pre>
  
  <p>This, however save the data but in the Data folder near the Bundle folder. (I havent tested it on a real device though). </p>
  
  <p>In debugger the constant fp is holding correct NSURL string so i simply just dont get what am i doing wrong. </p>
  
  <p>However, using <code>let fp = docPath + "/savedObject.data"</code>and subsequently in the archiveRootObject function saves the object in correct location although in debugger the strings are identical.</p>
  
  <p>My question is, could someone please explain me, what is wrong with the first approach? </p>