DownloadWebFile throws 404 error

I'm trying to download files from my skydrive account using the DownloadWebFile method, but even though I match the name of the file to the list of files on the skydrive it still throws a 404 (file not found) error when creating the file stream.

I've attached my code to see if anyone has any ideas.

Thanks in advance

Philip

Public Sub downloadSingleFile(ByVal folder As String, ByVal filename As String)
Dim client = New SkyDriveServiceClient
client.LogOn("user", "pwd")
client.Timeout = 99999999
Dim subFolderArray() As WebFolderInfo = Nothing
Dim rootFolderArray() As WebFolderInfo = client.ListRootWebFolders()
For i = 0 To UBound(rootFolderArray)
If rootFolderArray(i).Name = "Documents" Then
subFolderArray = client.ListSubWebFolders(rootFolderArray(i))
End If
Next
For i = 0 To UBound(subFolderArray)
If subFolderArray(i).Name = folder Then
Dim fileInfo() As WebFileInfo = client.ListSubWebFiles(subFolderArray(i))
For n = 0 To UBound(fileInfo)
If fileInfo(n).Name = filename Then
Using filestream As Stream = client.DownloadWebFile(fileInfo(n))
filestream.Dispose()
End Using
Exit Sub
End If
Next
End If
Next
End Sub

I had the same issue. I was able to resolve the 404 being returne by editing SkyDriveServiceClient.Helpers.cs method EncodeWebFolderItemPath. Uncomment the the string replace lines of code except for .Replace("","^"). This
is also mentioned in this post https://skydriveapiclient.codeplex.com/discussions/437089