Fix bug with GetDeviceNumber when there are spaces in filePath

Change-Id: I5ded3c438fedec22be875986ece62751a1639762